#include "log.h"
#include <stdio.h>

int main()
{
    logInit(PROJECT_LOG_ERROR, "app.log");
    PLOG("System start");
    PLOG("Connection count: %d", 42);
    printf("E=%d\n", PROJECT_LOG_ERROR);

    printf("%d\n", PROJECT_LOG_WARNING);
    printf("%d\n", PROJECT_LOG_INFO);
    printf("D=%d\n", PROJECT_LOG_DEBUG);
    logRecordLevel(PROJECT_LOG_DEBUG, "调试信息");   // 不输出
    logRecordLevel(PROJECT_LOG_INFO, "普通信息");    // 不输出
    logRecordLevel(PROJECT_LOG_WARNING, "警告信息"); // 输出
    logRecordLevel(PROJECT_LOG_ERROR, "错误信息");   // 输出

    logClose();
    return 0;
}
